In northwestern Costa Rica, Agelaia yepocapa (Richards) nests in cavities within living hollow trees in lower montane mesic forests; A. panamaensis (Cameron) nests in very large cavities in premontane gallery forests. Nests of both species have vertical combs with horizontal cells that face outward from the nest center; the nests have no enclosing envelope. In January 1996, an A. yepocapa colony was in full brood production, while an A. panamaensis colony was in the last stage of colony decline, and a nearby A. panamaensis colony had terminated only weeks before. The appearance of a small aggregation of A. panamaensis in a montane cloud forest site, too small to support a colony as large as those that had recently reached the end of a colony cycle in a nearby premontane gallery forest, suggests that the colony cycle of A. panamaensis in northwestern Costa Rica has a seasonal pattern that includes elevational migration and possible non-nesting quiescence at cool high elevations. Morphometric contrasts of queen and worker A. yepocapa confirm caste dimorphism that has been reported for other Agelaia species. The multivariate analysis presented here reveals caste differences that can only have occurred as a result of a dichotomy in developmental pathways during larval growth. Individuals of both species performed the behavior of gaster flagging during colony defense. The role of gaster flagging in these wasps is unknown. Near-nest aggressiveness of cavity-nesting wasps is higher than that of wasps that nest in exposed locations, perhaps as a correlate of the scarcity of suitable cavities for nesting. The sting of A. panamaensis is particularly painful. The A. panamaensis colony that was in decline was host to diverse inquilines and a parasitoid. The A. yepocapa nest collection included two parasitoid species.